const state = {
    org: [],
    allOrgs: [],
    territorys: []
}
const actions = {
    saveOrg: ({ commit }, payload) => {
        commit('SAVEORG', payload)
    },
    allOrgs: ({ commit }, payload) => {
        commit('ALLORGS', payload)
    },
    allTerritorys: ({ commit }, payload) => {
        commit('ALLTERRITORYS', payload)
    }
}
const mutations = {
    SAVEORG: (state, payload) => {
        state.org = payload.result
    },
    ALLORGS: (state, payload) => {
        state.allOrgs = payload
    },
    ALLTERRITORYS: (state, payload) => {
        state.territorys = payload
    }
}
const getters = {
    getOrg: state => state.org
}

export default {
    state,
    actions,
    mutations,
    getters
}